package com.app.shop.apadapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.List;

public class MyApadapter extends FragmentPagerAdapter {
    private List<Fragment> mfragmentlist;
    public MyApadapter(@NonNull FragmentManager fm,List<Fragment> fragmentlist) {
        super(fm);
        this.mfragmentlist=fragmentlist;
    }

    @NonNull
    @Override
    public Fragment getItem(int position) {
        return mfragmentlist.get(position);
    }

    @Override
    public int getCount() {
        return mfragmentlist.size();
    }
}
